{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"sx\"];\nimport { isPlainObject } from '@mui/utils';\nimport { propToStyleFunction } from '../getThemeValue';\nconst splitProps = props => {\n  const result = {\n    systemProps: {},\n    otherProps: {}\n  };\n  Object.keys(props).forEach(prop => {\n    if (propToStyleFunction[prop]) {\n      result.systemProps[prop] = props[prop];\n    } else {\n      result.otherProps[prop] = props[prop];\n    }\n  });\n  return result;\n};\nexport default function extendSxProp(props) {\n  const {\n      sx: inSx\n    } = props,\n    other = _objectWithoutPropertiesLoose(props, _excluded);\n  const {\n    systemProps,\n    otherProps\n  } = splitProps(other);\n  let finalSx;\n  if (Array.isArray(inSx)) {\n    finalSx = [systemProps, ...inSx];\n  } else if (typeof inSx === 'function') {\n    finalSx = function () {\n      const result = inSx(...arguments);\n      if (!isPlainObject(result)) {\n        return systemProps;\n      }\n      return _extends({}, systemProps, result);\n    };\n  } else {\n    finalSx = _extends({}, systemProps, inSx);\n  }\n  return _extends({}, otherProps, {\n    sx: finalSx\n  });\n}","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","isPlainObject","propToStyleFunction","splitProps","props","result","systemProps","otherProps","Object","keys","forEach","prop","extendSxProp","sx","inSx","other","finalSx","Array","isArray"],"sources":["/data/messenger.client/node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"sx\"];\nimport { isPlainObject } from '@mui/utils';\nimport { propToStyleFunction } from '../getThemeValue';\n\nconst splitProps = props => {\n  const result = {\n    systemProps: {},\n    otherProps: {}\n  };\n  Object.keys(props).forEach(prop => {\n    if (propToStyleFunction[prop]) {\n      result.systemProps[prop] = props[prop];\n    } else {\n      result.otherProps[prop] = props[prop];\n    }\n  });\n  return result;\n};\n\nexport default function extendSxProp(props) {\n  const {\n    sx: inSx\n  } = props,\n        other = _objectWithoutPropertiesLoose(props, _excluded);\n\n  const {\n    systemProps,\n    otherProps\n  } = splitProps(other);\n  let finalSx;\n\n  if (Array.isArray(inSx)) {\n    finalSx = [systemProps, ...inSx];\n  } else if (typeof inSx === 'function') {\n    finalSx = (...args) => {\n      const result = inSx(...args);\n\n      if (!isPlainObject(result)) {\n        return systemProps;\n      }\n\n      return _extends({}, systemProps, result);\n    };\n  } else {\n    finalSx = _extends({}, systemProps, inSx);\n  }\n\n  return _extends({}, otherProps, {\n    sx: finalSx\n  });\n}"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,6BAA6B,MAAM,yDAAyD;AACnG,MAAMC,SAAS,GAAG,CAAC,IAAI,CAAC;AACxB,SAASC,aAAa,QAAQ,YAAY;AAC1C,SAASC,mBAAmB,QAAQ,kBAAkB;AAEtD,MAAMC,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAMC,MAAM,GAAG;IACbC,WAAW,EAAE,CAAC,CAAC;IACfC,UAAU,EAAE,CAAC;EACf,CAAC;EACDC,MAAM,CAACC,IAAI,CAACL,KAAK,CAAC,CAACM,OAAO,CAACC,IAAI,IAAI;IACjC,IAAIT,mBAAmB,CAACS,IAAI,CAAC,EAAE;MAC7BN,MAAM,CAACC,WAAW,CAACK,IAAI,CAAC,GAAGP,KAAK,CAACO,IAAI,CAAC;IACxC,CAAC,MAAM;MACLN,MAAM,CAACE,UAAU,CAACI,IAAI,CAAC,GAAGP,KAAK,CAACO,IAAI,CAAC;IACvC;EACF,CAAC,CAAC;EACF,OAAON,MAAM;AACf,CAAC;AAED,eAAe,SAASO,YAAY,CAACR,KAAK,EAAE;EAC1C,MAAM;MACJS,EAAE,EAAEC;IACN,CAAC,GAAGV,KAAK;IACHW,KAAK,GAAGhB,6BAA6B,CAACK,KAAK,EAAEJ,SAA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